<%--
  author: winkyle
  date: 2018/11/22
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <!-- jsp文件头和头部 -->
    <%@ include file="../../base/top.jsp"%>
</head>
<body class="no-skin">
<!-- /section:basics/navbar.layout -->
<div class="main-container" id="main-container">
    <!-- /section:basics/sidebar -->
    <div class="main-content">
        <div class="main-content-inner">
            <div class="page-content">
                <div class="hr hr-18 dotted hr-double"></div>
                <div class="row">
                    <div class="col-xs-12">
                        
                            <div class="widget-header" style="text-align: center;height: 30px" >
                                <h3 class="widget-title" style="line-height: 20px"> ${courseDetail.courseInfo.courseName}</h3>
                            </div>

                            <div class="widget-main">
                                <div style="text-align: center">
                                    <label >课程介绍：${courseDetail.courseInfo.courseDescription}</label>
                                </div>
                                <hr />

                                <div style="text-align: center; margin-top: -10px">
                                    <label >开设学期：${courseDetail.courseInfo.courseStartTerm}</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <label >学分：${courseDetail.courseInfo.courseCredit}</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <label >学时：${courseDetail.courseInfo.courseHours}</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <label >课程类别：${courseDetail.courseInfo.courseType}</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <label >考核方式：${courseDetail.courseInfo.courseAssessmentMethod}</label>
                                </div>
                                <hr style="margin-top: 5px"/>


                                <div align="right">
                                    <div style="display: inline;">
                                        <label >当前得分：${(courseGrade!=null&&!"".equals(courseGrade))?courseGrade:'未评分'}</label>
                                    </div>
                                </div>

                                <hr style="height:1px;border:none;border-top:1px solid #555555;margin-top: 10px" />
                                <div class="page-content" >

                                    <ul class="nav nav-tabs padding-12 tab-color-blue background-blue">
                                        <li class="active">
                                            <a data-toggle="tab" href="#task">任务</a>
                                        </li>
                                        <li>
                                            <a data-toggle="tab" href="#project">项目</a>
                                        </li>
                                        <li>
                                            <a data-toggle="tab" href="#material">资料</a>
                                        </li>

                                    </ul>

                                    <div class="tab-content">
                                        <div id="task" class="tab-pane fade in active">
                                        </div>
                                        <div id="project" class="tab-pane fade">
                                        </div>
                                        <div id="material" class="tab-pane fade">
                                        </div>

                                    </div>
                                </div>
                            </div>


                    </div>
                    <!-- /.col -->
                </div>
                <!-- /.row -->
            </div>
            <!-- /.page-content -->
        </div>
    </div>
    <!-- /.main-content -->
    <!-- 返回顶部 -->
    <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
        <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
    </a>

</div>
<!-- /.main-container -->
<!-- basic scripts -->
<!-- 页面底部js¨ -->
<%@ include file="../../base/foot.jsp"%>

<script type="text/javascript">
    $(top.hangge());
    //准备tabs数据

    var tabsData = [{
        "id" : "task",
        "url" : "task"
    },{
        "id" : "material",
        "url" : "course_material"
    },{
        "id":"group",
        "url": "group"
    },];
    function showTabs(tabsId,url) {
        $("a[href='#"+tabsId+"']").tab('show');
        var tabContent = $('#'+tabsId);
        tabContent.load('teach_course/select_course_detail_tab/${courseDetail.teachCourseId}/'+url);
    }
    function tabsHandler(event) {
        var data = event.data;
        showTabs(data.id,data.url);
        return false;
    }
    $(tabsData).each(function(){
        $("a[href='#"+this.id+"']").bind('click',{
            id : this.id,
            url : this.url
        },tabsHandler);
    });
    $("a[href='#task']").trigger("click");

</script>
</body>
</html>